Created on May 02, 2021 || Updated on May 09, 2021
The objective of this analysis is to explore the distribution and variations in the patterns of key child health indicators among selected developing countries. The indicators being explored are:
a. Childhood stunting prevalence (i.e. CSP, the percentage of children stunted measured as below -2 SD of height for age according to the WHO standard);
b. Infant mortality rate (i.e. IMR, the probability of dying before the first birthday in the five or ten years preceding the survey, per 1,000 live births); and,
c. Under-five mortality rate (i.e. UMR, the probability of dying before the fifth birthday in the five or ten years preceding the survey, per 1,000 live births)
This exploratory analysis is based on tabulated indicators by the Demographic and Health Survey (DHS) program freely accessible at the program’s website. Country classification into sub-regions was based on the standard country or area codes for statistical use (M49) compiled by the United Nations Department of Economic and Social Affairs’ Statistics Division.
p_load(tidyverse,dplyr,tidyr,readr,readxl,openxlsx)In the steps that follow, I read in and merged tabular indicator dataframes into single structured dataframe. I also made necessary adjustments to variable names and recoded variable labels where necessary:
files <- list.files(getwd(), pattern = ".xlsx", full.names = T)
files[1] "C:/rsch/lead/stat/02/a/~$countrylist.xlsx"
[2] "C:/rsch/lead/stat/02/a/~$dhs_indicators.xlsx"
[3] "C:/rsch/lead/stat/02/a/dhs_indicators.xlsx"
[4] "C:/rsch/lead/stat/02/a/unsd_regions.xlsx"
getSheetNames(files[3]) [1] "UnderfiveStunting" "InfantMortality"
[3] "UnderfiveMortality" "ExclusiveBreastfeeding"
[5] "IYCF" "MinimumFoodGroups&MealFrequency"
[7] "ModernContraception" "UnmetNeeds"
[9] "MaternalThinness" "MaternalObesity"
[11] "SecondaryEducation" "WomenEmployment"
[13] "FinalSayInAllDecisions" "FGC"
dt_chstun <- read_xlsx("C:/rsch/lead/stat/02/a/dhs_indicators.xlsx", sheet=1)
dt_u1mort <- read_xlsx("C:/rsch/lead/stat/02/a/dhs_indicators.xlsx", sheet=2)
dt_u5mort <- read_xlsx("C:/rsch/lead/stat/02/a/dhs_indicators.xlsx", sheet=3)
dt_region <- read_xlsx(files[4])[,1:5]names(dt_chstun)[1] "Country" "Most Recent Survey" "Total"
names(dt_region)[1] "Sub-region Name" "Intermediate Region Name"
[3] "Country" "ISO-alpha2 Code"
[5] "ISO-alpha3 Code"
# clean column names
colClean_fn <- function(x){
colnames(x) <- gsub(pattern=" |-|/", replacement="", x=colnames(x)); x}
dt_chstun <- colClean_fn(dt_chstun)
dt_chstun <- dt_chstun %>% transmute(Country=Country, RecentDHS=MostRecentSurvey, CSP=Total)
dt_u1mort <- colClean_fn(dt_u1mort)
dt_u1mort <- dt_u1mort %>% transmute(Country=Country, RecentDHS=MostRecentSurvey, IMR=Total)
dt_u5mort <- colClean_fn(dt_u5mort)
dt_u5mort <- dt_u5mort %>% transmute(Country=Country, RecentDHS=MostRecentSurvey, UMR=Total)
dt_region <- colClean_fn(dt_region)
dt_region <- dt_region %>% transmute(Subregion=SubregionName, Subregion2=IntermediateRegionName,
Country=Country, ISO_A2=ISOalpha2Code, ISO_A3=ISOalpha3Code)names(dt_chstun)[1] "Country" "RecentDHS" "CSP"
names(dt_region) [1] "Subregion" "Subregion2" "Country" "ISO_A2" "ISO_A3"
dt_merged <- merge(dt_chstun, dt_u1mort, by = c(1:2), all.x = TRUE)
dt_merged <- merge(dt_merged, dt_u5mort, by = c(1:2), all.x = TRUE)
dt_merged <- merge(dt_region, dt_merged, by = "Country", all.y = TRUE)
names(dt_merged)[1] "Country" "Subregion" "Subregion2" "ISO_A2" "ISO_A3"
[6] "RecentDHS" "CSP" "IMR" "UMR"
knitr::kable(head(dt_merged, 20))| Country | Subregion | Subregion2 | ISO_A2 | ISO_A3 | RecentDHS | CSP | IMR | UMR |
|---|---|---|---|---|---|---|---|---|
| Albania | Southern Europe | Southern Europe | AL | ALB | DHS 2017-18 | 0.113 | NA | NA |
| Angola | Sub-Saharan Africa | Middle Africa | AO | AGO | DHS 2015-16 | 0.376 | 44(CI: 39 - 50) | 68(CI: 61 - 76) |
| Armenia | Western Asia | Western Asia | AM | ARM | DHS 2015-16 | 0.094 | 4(CI: 1 - 7) | 6(CI: 3 - 10) |
| Azerbaijan | Western Asia | Western Asia | AZ | AZE | DHS 2006 | 0.251 | 43(CI: 32 - 54) | 50(CI: 38 - 61) |
| Bangladesh | Southern Asia | Southern Asia | BD | BGD | DHS 2017-18 | 0.308 | 38(CI: 33 - 43) | 45(CI: 40 - 50) |
| Benin | Sub-Saharan Africa | Western Africa | BJ | BEN | DHS 2017-18 | 0.322 | 55(CI: 50 - 60) | 96(CI: 90 - 103) |
| Bolivia | NA | NA | NA | NA | DHS 2008 | 0.271 | 50(CI: 43 - 56) | 63(CI: 56 - 70) |
| Burkina Faso | Sub-Saharan Africa | Western Africa | BF | BFA | DHS 2010 | 0.346 | 65(CI: 60 - 70) | 129(CI: 120 - 137) |
| Burundi | Sub-Saharan Africa | Eastern Africa | BI | BDI | DHS 2016-17 | 0.559 | 47(CI: 42 - 52) | 78(CI: 71 - 85) |
| Cambodia | South-eastern Asia | South-eastern Asia | KH | KHM | DHS 2014 | 0.324 | 28(CI: 22 - 34) | 35(CI: 28 - 41) |
| Cameroon | Sub-Saharan Africa | Middle Africa | CM | CMR | DHS 2018 | 0.289 | 48(CI: 42 - 53) | 80(CI: 72 - 87) |
| Chad | Sub-Saharan Africa | Middle Africa | TD | TCD | DHS 2014-15 | 0.399 | 72(CI: 66 - 78) | 133(CI: 125 - 141) |
| Colombia | Latin America and the Caribbean | South America | CO | COL | DHS 2010 | 0.132 | NA | NA |
| Comoros | Sub-Saharan Africa | Eastern Africa | KM | COM | DHS 2012 | 0.301 | 36(CI: 27 - 45) | 50(CI: 38 - 61) |
| Congo | Sub-Saharan Africa | Middle Africa | CG | COG | DHS 2011-12 | 0.244 | 39(CI: 33 - 46) | 68(CI: 59 - 76) |
| Congo Democratic Republic | NA | NA | NA | NA | DHS 2013-14 | 0.427 | 58(CI: 53 - 63) | 104(CI: 97 - 112) |
| Cote d’Ivoire | NA | NA | NA | NA | DHS 2011-12 | 0.298 | 68(CI: 59 - 77) | 108(CI: 97 - 119) |
| Dominican Republic | Latin America and the Caribbean | Caribbean | DO | DOM | DHS 2013 | 0.069 | 27(CI: 20 - 35) | 31(CI: 23 - 39) |
| Egypt | Northern Africa | Northern Africa | EG | EGY | DHS 2014 | 0.214 | 22(CI: 19 - 25) | 27(CI: 24 - 31) |
| Eritrea | Sub-Saharan Africa | Eastern Africa | ER | ERI | DHS 2002 | 0.429 | 48(CI: 41 - 54) | 93(CI: 84 - 103) |
dt_merged$Subregion<-
ifelse(dt_merged$Country=="Bolivia", "Latin America and the Caribbean", dt_merged$Subregion)
dt_merged$Subregion2<-
ifelse(dt_merged$Country=="Bolivia", "South America", dt_merged$Subregion2)
dt_merged$Subregion<-
ifelse(dt_merged$Country=="Congo Democratic Republic", "Sub-Saharan Africa", dt_merged$Subregion)
dt_merged$Subregion2<-
ifelse(dt_merged$Country=="Congo Democratic Republic", "Middle Africa", dt_merged$Subregion2)
dt_merged$Subregion<-
ifelse(dt_merged$Country=="Cote d'Ivoire", "Sub-Saharan Africa", dt_merged$Subregion)
dt_merged$Subregion2<-
ifelse(dt_merged$Country=="Cote d'Ivoire", "Western Africa", dt_merged$Subregion2)
dt_merged$Subregion<-
ifelse(dt_merged$Country=="Kyrgyz Republic", "Central Asia", dt_merged$Subregion)
dt_merged$Subregion2<-
ifelse(dt_merged$Country=="Kyrgyz Republic", "Central Asia", dt_merged$Subregion2)
dt_merged$Subregion<-
ifelse(dt_merged$Country=="Moldova", "South-eastern Asia", dt_merged$Subregion)
dt_merged$Subregion2<-
ifelse(dt_merged$Country=="Moldova", "South-eastern Asia", dt_merged$Subregion2)
dt_merged$Subregion<-
ifelse(dt_merged$Country=="Tanzania", "Sub-Saharan Africa", dt_merged$Subregion)
dt_merged$Subregion2<-
ifelse(dt_merged$Country=="Tanzania", "Eastern Africa", dt_merged$Subregion2)
dt_merged<-na.omit(dt_merged)
knitr::kable(head(dt_merged, 20))| Country | Subregion | Subregion2 | ISO_A2 | ISO_A3 | RecentDHS | CSP | IMR | UMR | |
|---|---|---|---|---|---|---|---|---|---|
| 2 | Angola | Sub-Saharan Africa | Middle Africa | AO | AGO | DHS 2015-16 | 0.376 | 44(CI: 39 - 50) | 68(CI: 61 - 76) |
| 3 | Armenia | Western Asia | Western Asia | AM | ARM | DHS 2015-16 | 0.094 | 4(CI: 1 - 7) | 6(CI: 3 - 10) |
| 4 | Azerbaijan | Western Asia | Western Asia | AZ | AZE | DHS 2006 | 0.251 | 43(CI: 32 - 54) | 50(CI: 38 - 61) |
| 5 | Bangladesh | Southern Asia | Southern Asia | BD | BGD | DHS 2017-18 | 0.308 | 38(CI: 33 - 43) | 45(CI: 40 - 50) |
| 6 | Benin | Sub-Saharan Africa | Western Africa | BJ | BEN | DHS 2017-18 | 0.322 | 55(CI: 50 - 60) | 96(CI: 90 - 103) |
| 8 | Burkina Faso | Sub-Saharan Africa | Western Africa | BF | BFA | DHS 2010 | 0.346 | 65(CI: 60 - 70) | 129(CI: 120 - 137) |
| 9 | Burundi | Sub-Saharan Africa | Eastern Africa | BI | BDI | DHS 2016-17 | 0.559 | 47(CI: 42 - 52) | 78(CI: 71 - 85) |
| 10 | Cambodia | South-eastern Asia | South-eastern Asia | KH | KHM | DHS 2014 | 0.324 | 28(CI: 22 - 34) | 35(CI: 28 - 41) |
| 11 | Cameroon | Sub-Saharan Africa | Middle Africa | CM | CMR | DHS 2018 | 0.289 | 48(CI: 42 - 53) | 80(CI: 72 - 87) |
| 12 | Chad | Sub-Saharan Africa | Middle Africa | TD | TCD | DHS 2014-15 | 0.399 | 72(CI: 66 - 78) | 133(CI: 125 - 141) |
| 14 | Comoros | Sub-Saharan Africa | Eastern Africa | KM | COM | DHS 2012 | 0.301 | 36(CI: 27 - 45) | 50(CI: 38 - 61) |
| 15 | Congo | Sub-Saharan Africa | Middle Africa | CG | COG | DHS 2011-12 | 0.244 | 39(CI: 33 - 46) | 68(CI: 59 - 76) |
| 18 | Dominican Republic | Latin America and the Caribbean | Caribbean | DO | DOM | DHS 2013 | 0.069 | 27(CI: 20 - 35) | 31(CI: 23 - 39) |
| 19 | Egypt | Northern Africa | Northern Africa | EG | EGY | DHS 2014 | 0.214 | 22(CI: 19 - 25) | 27(CI: 24 - 31) |
| 20 | Eritrea | Sub-Saharan Africa | Eastern Africa | ER | ERI | DHS 2002 | 0.429 | 48(CI: 41 - 54) | 93(CI: 84 - 103) |
| 21 | Eswatini | Sub-Saharan Africa | Southern Africa | SZ | SWZ | DHS 2006-07 | 0.289 | 85(CI: 73 - 97) | 120(CI: 105 - 135) |
| 22 | Ethiopia | Sub-Saharan Africa | Eastern Africa | ET | ETH | DHS 2019 | 0.368 | 47(CI: 36 - 57) | 59(CI: 48 - 70) |
| 23 | Gabon | Sub-Saharan Africa | Middle Africa | GA | GAB | DHS 2012 | 0.165 | 43(CI: 35 - 50) | 65(CI: 56 - 74) |
| 24 | Gambia | Sub-Saharan Africa | Western Africa | GM | GMB | DHS 2013 | 0.245 | 34(CI: 28 - 40) | 54(CI: 45 - 62) |
| 25 | Ghana | Sub-Saharan Africa | Western Africa | GH | GHA | DHS 2014 | 0.188 | 41(CI: 34 - 48) | 60(CI: 52 - 68) |
Here, I extract only the point estimates of the indicators eliminating the corresponding confidence intervals (CI) seen in the above table. Also, I changed the CSP from proportion to percentage format. This is done to improve the usability of the estimates and the intuitiveness of the analysis.
# Extract values/characters before pattern
dt_merged <- dt_merged %>%
mutate(CSP=CSP*100)
dt_merged$IMR<-as.character(dt_merged$IMR)
dt_merged$IMR<-substr(dt_merged$IMR, 1, 3)
dt_merged$IMR<-as.numeric(gsub(".*?([0-9]+).*", "\\1", dt_merged$IMR))
dt_merged$UMR<-as.character(dt_merged$UMR)
dt_merged$UMR<-substr(dt_merged$UMR, 1, 3)
dt_merged$UMR<-as.numeric(gsub(".*?([0-9]+).*", "\\1", dt_merged$UMR))
#View(dt_merged)
psych::headTail(dt_merged[,-2],10,9)dt_merged$CSP_grouped<-cut_interval(dt_merged$CSP, 5)
#freq(dt_merged$CSP_grouped)
dt_merged$CSP_grouped<-
factor(dt_merged$CSP_grouped,
levels=c("[6.9,16.7]","(16.7,26.5]","(26.5,36.3]","(36.3,46.1]","(46.1,55.9]"),
labels=c("Lowest","Lower","Middle","Higher","Highest"))
#freq(dt_merged$CSP_grouped)dt_merged$IMR_grouped<-cut_interval(dt_merged$IMR, 5)
#freq(dt_merged$IMR_grouped)
dt_merged$IMR_grouped<-
factor(dt_merged$IMR_grouped,
levels=c("[4,20.2]","(20.2,36.4]","(36.4,52.6]","(52.6,68.8]","(68.8,85]"),
labels=c("Lowest","Lower","Middle","Higher","Highest"))
#freq(dt_merged$IMR_grouped)dt_merged$UMR_grouped<-cut_interval(dt_merged$UMR, 5)
#freq(dt_merged$UMR_grouped)
dt_merged$UMR_grouped<-
factor(dt_merged$UMR_grouped,
levels=c("[6,31.4]","(31.4,56.8]","(56.8,82.2]","(82.2,108]","(108,133]"),
labels=c("Lowest","Lower","Middle","Higher","Highest"))
#freq(dt_merged$UMR_grouped)psych::headTail(dt_merged[,-(2:6)],10,9)font <- list(family = "Lucida Sans Typewriter", size = 10, color = 'blue')dt_merged %>%
select(CSP:UMR) %>%
ggcorrm(rescale = "by_sd") +
utri_heatmap(alpha = 0.5) +
lotri_heatcircle(alpha = 0.5, col = 1) +
utri_corrtext() +
dia_names(y_pos = 0.15, size = 3) +
dia_density(lower = 0.3, fill = "lightgrey", color = 1) +
scale_fill_corr()The above correlation matrix chart shows very strong positive relationship between infant and underfive mortality rates, as expected, but very weak association between the two mortality indicators and childhood stunting prevalence. This suggest that some countries ranked high on IMR and UMR indicators but ranked low on CSP measure.
Figures 2-7 highlight substantial variations in CSP, IMR and UMR among countries. However, the results show that children from sub-Saharan African countries are worse off in all the three indicators considered compared with their peers from others regions.
dt_merged$CSP<-fct_relevel(as.factor(dt_merged$CSP))
fig <-
plot_ly(dt_merged, x = ~reorder(CSP, Country), y = ~Country,
type = 'bar', orientation = 'h', height=1000, width=800)
fig <- fig %>%
layout(title='Fig 2. Childhood stunting prevalence by country',
xaxis = list(title = "Prevalence", showgrid = T, range = c(0,60)),
yaxis = list(title = "", showgrid = F, zeroline = T),
font=font)
figfig <-
plot_ly(dt_merged, x = ~reorder(IMR, Country), y = ~Country,
type = 'bar', orientation = 'h', height=1000, width=800)
fig <- fig %>%
layout(title='Fig 3. Infant mortality rates by country',
xaxis = list(title = "Prevalence", showgrid = T, range = c(0,60)),
yaxis = list(title = "", showgrid = F, zeroline = T),
font=font)
figfig <-
plot_ly(dt_merged, x = ~reorder(UMR, Country), y = ~Country,
type = 'bar', orientation = 'h', height=1000, width=800)
fig <- fig %>%
layout(title='Fig 4. Underfive mortality rates by country',
xaxis = list(title = "Prevalence", showgrid = T, range = c(0,60)),
yaxis = list(title = "", showgrid = F, zeroline = T),
font=font)
figlibrary(rnaturalearth)
world <- ne_countries(returnclass = "sf")world <- world %>%
filter(subregion!="Antarctica", subregion!="Seven seas (open ocean)") %>%
select(continent, subregion, region_wb, name, iso_a2, iso_a3, type, income_grp, economy)
dt_spatialviz <- geo_join(world, dt_merged, 'iso_a2', 'ISO_A2', how = 'inner')The primary data file dt_merged comprises of 55, whereas the combined dt_spatialviz spatial dataframe has 52 matched countries.
fig <-
plot_ly(dt_spatialviz, split = ~CSP_grouped, color = ~CSP_grouped,
stroke = I("black"), span = I(1), height=500, width=800)
fig <- fig %>%
layout(title='Fig 5. Spatial pattern of childhood stunting',
font=font)
figfig <-
plot_ly(dt_spatialviz, split = ~IMR_grouped, color = ~IMR_grouped,
stroke = I("black"), span = I(1), height=500, width=800)
fig <- fig %>%
layout(title='Fig 6. Spatial pattern of infant mortality',
font=font)
figfig <-
plot_ly(dt_spatialviz, split = ~UMR_grouped, color = ~UMR_grouped,
stroke = I("black"), span = I(1), height=500, width=800)
fig <- fig %>%
layout(title='Fig 7. Spatial pattern of underfive mortality',
font=font)
figknitr::knit_exit()